<!-- head -->
<div class="row wrapper border-bottom white-bg page-heading">
  <div class="col-md-12">
    <ol class="breadcrumb">
      <li><a>主页</a></li>
      <li><a>代理商工单</a></li>
      <li class="active"><strong>工单配置
      </strong></li>
    </ol>
  </div>
</div>

<div class="wrapper wrapper-content animated fadeIn"
     ng-controller="workProductConfig">
  <form class="form-horizontal" id="form1" name="horizontal">
    <div style="background: #fff; padding:50px 0;">
      <div class="ibox-title">
        <h5>首刷投诉字段配置</h5>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">工单类型：</label>
        <div class="col-sm-2" ng-show="!disabledFlag">
          <select name="workTypeId" id="autocomplete-select1"
                  ng-model="info.workTypeId" ng-options="x.value as x.text for x in nameSelect1"
                  ng-change="workTypeChange(1)"
                  style="width: 100%" chosen chosen-data="nameSelect1">
          </select>
        </div>
      </div>

      <div class="form-group">
        <div class="col-sm-2"/>
        <div class="col-sm-3">
          <div class="gridStyle" ng-show="!disabledFlag" style="height: 200px!important;" ui-grid="workTypeListGrid" ui-grid-resize-columns
               ui-grid-selection ui-grid-pinning/>
          <div class="gridStyle" ng-show="disabledFlag" style="height: 200px!important;" ui-grid="workTypeListGrid" ui-grid-resize-columns
               ui-grid-pinning/>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-2"/>
        <div class="col-sm-3">
          <label style="color: silver;" class="control-label">注：数据统计功能仅统计已勾选的工单类型</label>
        </div>
      </div>
      <!--<div class="ibox-title">
        <h5>数据统计范围配置</h5>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">工单类型：</label>
        <div class="col-sm-2">
          <select name="workTypeId" id="autocomplete-select2" ng-disabled="disabledFlag"
                  ng-model="info.countWorkTypeId" ng-options="x.value as x.text for x in nameSelect2"
                  ng-change="workTypeChange(2)"
                  style="width: 100%" chosen chosen-data="nameSelect2">
          </select>
        </div>

      </div>

      <div class="form-group">
        <div class="col-sm-2"/>
        <div class="col-sm-3">
          <div class="gridStyle" style="height: 200px!important;" ui-grid="countTypeListGrid" ui-grid-resize-columns
               ui-grid-selection ui-grid-pinning/>
        </div>
      </div>

      <div class="form-group">
        <div class="col-sm-2"/>
        <div class="col-sm-3">
          <label style="color: silver;" class="control-label">注：数据统计功能仅统计已勾选的工单类型</label>
        </div>
      </div>-->
      <div class="ibox-title">
        <h5>处罚预警配置</h5>
      </div>

      <div class="form-group" ng-show="!disabledFlag" >
        <label class="col-sm-2 control-label">预警开关：</label>
        <div class="col-sm-10">
          <switch class="switch switch-s" ng-true-value="1" ng-false-value="0" ng-model="info.warningSwitch" ng-disabled="disabledFlag"></switch>

        </div>
      </div>


    <div class="form-group" ng-show="disabledFlag" >
      <label class="col-sm-2 control-label">预警开关：</label>
      <div class="col-sm-6 checkbox">
        {{info.warningSwitch==1?"打开":"关闭"}}
      </div>
    </div>


      <div class="form-group">
        <label class="col-sm-2 control-label"> </label>
        <div class="col-sm-4">
          直属代理商超过<input type="number" style=" width:80px" ng-disabled="disabledFlag" ng-model="warnInfo.agent.warningNumber">笔投诉，系统自动下发处罚预警
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label"> </label>
        <div class="col-sm-4">
          一级代理商超过<input type="number" style=" width:80px" ng-disabled="disabledFlag" ng-model="warnInfo.oneLevelAgent.warningNumber">笔投诉，系统自动下发处罚预警
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-4">
          直属代理商预警内容：
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">预警标题：</label>
        <div class="col-sm-3">
          <input type="text" class="form-control" ng-disabled="disabledFlag" ng-model='warnInfo.agent.warningTitle'/>
        </div>
      </div>

      <div class="form-group">
        <label class="col-sm-2 control-label">预警内容：</label>
        <div class="col-sm-6" style="width: 400px;">
          <textarea ng-model="warnInfo.agent.warningContent" ng-disabled="disabledFlag" maxlength="300" cols="50" rows="10" name="workContent"
          ></textarea>
        </div>
      </div>

      <div class="form-group">
        <div class="col-sm-4">
          一级代理商预警内容：
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">预警标题：</label>
        <div class="col-sm-3">
          <input type="text" class="form-control" ng-disabled="disabledFlag" ng-model='warnInfo.oneLevelAgent.warningTitle'/>
        </div>
      </div>

      <div class="form-group">
        <label class="col-sm-2 control-label">预警内容：</label>
        <div class="col-sm-6" style="width: 400px;">
          <textarea ng-model="warnInfo.oneLevelAgent.warningContent" ng-disabled="disabledFlag" maxlength="300" cols="50" rows="10"
                    name="workContent"
          ></textarea>
        </div>

      </div>
      <div class="form-group">
        <div class="col-sm-2"/>
        <div class="col-sm-4">
          <label style="color: silver;" class="control-label">注：1、预警开关关闭后不会再向代理商发送预警信息</label>
          <label style="color: silver;" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp&nbsp;2、配置的超过笔数仅统计数据统计范围配置中的工单类型</label>
          <label style="color: silver;" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp3、预警超过笔数按月份进行统计，统计数据每月刷新</label>
        </div>
      </div>

      <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-6">
          <button ng-show="disabledFlag && hasPermit('workProductConfig.update')" ng-disabled="horizontal.$invalid || submitting " class="btn btn-primary" type="button"
                  ng-click='toUpdate()'>修改
          </button>
          <button ng-show="!disabledFlag" ng-disabled="horizontal.$invalid || submitting " class="btn btn-primary" type="button"
                  ng-click='submit()'>提交
          </button>
        </div>
      </div>
    </div>
  </form>

</div>

